import service from '../utils/request'

export function fetchSubjectByCondition (data) {
    return service({
        url: '/subject/select',
        method: 'post',
        data
    })
}

export function deleteSubject (params) {
    return service({
        url: `/subject/${params}`,
        method: 'delete'
    })
}

export function editSubject (data) {
    return service({
        url: '/subject',
        method: 'put',
        data
    })
}

export function addSubject (data) {
    return service({
        url: '/subject',
        method: 'post',
        data
    })
}

export function commitSubject(data) {
    return service({
        url: '/task',
        method: 'post',
        data
    })
}